// upload
export const uploadProperties = [
    {
        model: 'ui.action',
        widget: 'input',
        label: '上传的地址',
        ui: {
            type: 'textarea',
            placeholder: '必填'
        }
    },
    {
        model: 'ui.accept',
        widget: 'input',
        label: '上传文件类型',
        ui: {
            type: 'textarea',
            placeholder: '请输入上传文件类型'
        }
    },
    {
        model: 'ui.multiple',
        widget: 'switch',
        label: '支持文件多选'
    },
    {
        model: 'ui.limit',
        widget: 'inputNumber',
        label: '最大允许上传个数',
        ui: {
            placeholder: '请输入最大长度',
            min: 0,
            max: 99999999,
            precision: 0,
            controlsPosition: 'right',
            style: {
                width: '100%'
            }
        }
    },
    {
        model: 'ui.name',
        widget: 'input',
        label: '上传文件字段名',
        ul: {
            placeholder: '请输入上传文件字段名',
            maxlength: 20
        }
    },
    {
        model: 'ui.withCredentials',
        widget: 'switch',
        label: '支持发送cookie凭证信息'
    },
    {
        model: 'ui.showFileList',
        widget: 'switch',
        label: '显示已上传文件列表'
    },
    {
        model: 'ui.listType',
        widget: 'select',
        label: '文件列表的类型',
        enum: [
            { label: 'text', value: 'text' },
            { label: 'picture', value: 'picture' },
            { label: 'picture-card', value: 'picture-card' }
        ],
        ui: {
            placeholder: '请选择文件列表类型',
            style: {
                width: '100%'
            }
        },
        if(model) {
            return model && model.ui && model.ui.showFileList
        }
    },
    {
        model: 'ui.drag',
        widget: 'switch',
        label: '拖拽上传'
    }
]
